home *** CD-ROM | disk | FTP | other *** search
-
- ; RELATIVE.LSP
-
- ; By Simon Jones Autodesk Ltd, London 23 July 1986
-
- ; This macro provides a point that is relative by a
- ; given angle and distance to a known point such as
- ; the "End pt" of a line or "Centre of" a circle.
-
- ; When AutoCAD requires a point for a command
- ; respond with:
- ; !(relative) (from keyboard)
-
- ; Or alternatively enter the following line as a menu
- ; command in the "**OSNAPB 3" sub-menu in the screen menu
- ; with the remaining object snap commands:
-
- ; [RELATIVE]!(offset) $s=
-
- ; The macro can be copied onto an ACAD.LSP file to ensure
- ; it is allows loaded into a drawing
-
- ; then:
- ; 1) Enter or select a point.
- ; (using object snap if required)
- ; 2) Enter or show a distance relative to
- ; the selected point.
- ; 3) Enter or show an angle relative to
- ; the selected point
-
- (defun RELATIVE ()
- (setq pts (getpoint "\nRelative to: "))
- (setq dist (getdist pts "\nRelative distance: "))
- (setq ang (getangle pts "\nRelative angle: "))
- (setq pt (polar pts ang dist))
- )